<template>
  <up-radio-group
    activeColor="#f67800"
    iconPlacement="right"
    placement="column"
    v-bind="$attrs"
  >
    <up-radio
      v-for="(item, index) in radiolist1"
      :key="index"
      :customStyle="{marginBottom: '8px'}"
      :label="item.name"
      :name="item.value"
    >
      <template #label>
        <view class="radio-label l_f_r">
          <view class="img_cnt">
            <image :src="item.url" class="img" mode=""></image>
          </view>
          <text class="text_5_28">{{ item.name }}
          </text>
        </view>
      </template>
    </up-radio>
  </up-radio-group>
</template>
<script lang="ts" setup>

import { computed } from "vue";
import {is_weixin} from "@/utils/isWeixinH5";

const radiolist1 = computed(() => {
  let list = [
    // {
    //   name: "余额",
    //   disabled: false,
    //   value: 0, // 余额支付
    //   url: "https://img.shengshantaling.com/static/appImg/icon/pay/ye.png"
    // },
    {
      name: "支付宝",
      disabled: false,
      value: 1, // 支付宝支付
      url: "https://pili-vod.guanxikeji.com/fubao/img/1757311629380.png"

    },
    {
      name: "微信",
      disabled: false,
      value: 2, // 微信支付
      url: "https://pili-vod.guanxikeji.com/fubao/img/1757311647971.png"

    },


    // {
    //   name: '银行卡',
    //   disabled: false,
    //   value: 3, // 银行卡支付
    // },
  ];
  if(is_weixin()){
    list=list.filter(item=>item.value==2)
  }
  return list;

});
</script>

<style lang="scss" scoped>
.radio-label {
  .img_cnt {
    width: 40rpx;
    height: 40rpx;
    margin-right: 12rpx;
  }
}
</style>
